<template>
  <div class="listmenu"  :style="'padding:' +data.padding.top/2+'px '+data.padding.lr/2+'px '+data.padding.bottom/2+'px '">
    <div class="container" :style="'background:'+data.bgcolor+';border-radius:'+ data.radius.top/2+'px '+ data.radius.top/2+'px '+ data.radius.bottom/2+'px '+ data.radius.bottom/2+'px '">
      <ul class="bg">
        <li class="menu-item" v-for="(item,i) in data.list" :key='i'>
          <p class="lefttit"><i :class="'icon iconfont '+item.icon" :style="'color:'+data.left.iconcolor"></i><span class="tit" :style="'color:'+data.left.textcolor">{{item.left_text}}</span></p>
          <p class="righttit" :style="'color:'+data.right.textcolor"><span>{{item.right_text}}</span><i :class="'iconfont '+data.right.icon"
              :style="'color:'+data.right.iconcolor"></i></p>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {

      }
    },
    props: {
      data: {
        type: Object,
        default: {}
      }
    },

  }
</script>

<style lang="scss">
  .listmenu {
    padding: 8px 12px 0;

    .container {
      padding-left: 12px;
      border-radius: 6px;

      .bg {
        width: 100%;
        display: flex;
        position: relative;
        box-sizing: border-box;
        flex-direction: column;

        li {
          list-style: none;
        }

        .lefttit {
          display: flex;
          font-size: 14px;
          justify-content: center;
          align-items: center;

          i {
            margin: auto;
            font-size: 18px;
            line-height: 18px;
          }

          span {
            font-family: PingFang SC;
            font-style: normal;
            font-size: 14px;
            color: #212121;
            margin-left: 4px;
            line-height: 18px;
          }
        }

        .righttit {
          position: absolute;
          cursor: pointer;
          right: 12px;
          display: flex;
          top: 0;
          bottom: 0;
          margin: auto;
          justify-content: center;
          align-items: center;
          font-size: 12px;
          font-family: PingFang SC;
          font-style: normal;
          font-weight: 500;
          color: #969696;

          span {
            font-size: 12px;
          }

          i {
            font-size: 16px;
            margin-top: 1px;
          }
        }

        .menu-item {
          width: 100%;
          display: flex;
          position: relative;
          box-sizing: border-box;
          height: 48px;
          border-bottom: 0.61075px solid #eee;
        }

      }
    }
  }
</style>
